/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.brain.plan.dto;

import com.brain.sgc.dto.PersonaDto;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 *
 * @author HvivesO
 */
@Entity
@Table(name = "TPLAN_PERIODO_REMUN")
public class PeriodoRemunDto implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "SEQ_TPLAN_PERIODO_REMUN")
    @TableGenerator(name = "SEQ_TPLAN_PERIODO_REMUN", table = "TCORE_ENTIDAD", pkColumnName = "NOMBRE", valueColumnName = "CORRELATIVO", pkColumnValue = "TPLAN_PERIODO_REMUN", allocationSize = 1)
    private Long id;
    @JoinColumn(name = "CALCULO", referencedColumnName = "ID")
    @ManyToOne
    private CalculoDto calculoDto;
    @JoinColumn(name = "EMPLEADO", referencedColumnName = "ID")
    @ManyToOne
    private PersonaDto empleadoDto;
    @Column(name = "TOTAL_REMUNERACION")
    private BigDecimal totalRemuneracion;
    @Column(name = "TOTAL_DCTOS")
    private BigDecimal totalDctos;
    @Column(name = "NETO")
    private BigDecimal neto;


    public PeriodoRemunDto() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public PersonaDto getEmpleadoDto() {
        return empleadoDto;
    }

    public void setEmpleadoDto(PersonaDto empleadoDto) {
        this.empleadoDto = empleadoDto;
    }

    public BigDecimal getTotalRemuneracion() {
        return totalRemuneracion;
    }

    public void setTotalRemuneracion(BigDecimal totalRemuneracion) {
        this.totalRemuneracion = totalRemuneracion;
    }

    public BigDecimal getTotalDctos() {
        return totalDctos;
    }

    public void setTotalDctos(BigDecimal totalDctos) {
        this.totalDctos = totalDctos;
    }

    public BigDecimal getNeto() {
        return neto;
    }

    public void setNeto(BigDecimal neto) {
        this.neto = neto;
    }

    public CalculoDto getCalculoDto() {
        return calculoDto;
    }

    public void setCalculoDto(CalculoDto calculoDto) {
        this.calculoDto = calculoDto;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PeriodoRemunDto)) {
            return false;
        }
        PeriodoRemunDto other = (PeriodoRemunDto) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.brain.plan.dto.PeriodoRemunDto[ id=" + id + " ]";
    }
    
}
